//var ioc = {
//    dao : {
//        type : "org.nutz.dao.impl.ext.LazyNutDao",
//        fields : {
//            cycle : "true",
//            dataSource : {
//                type : "com.alibaba.druid.pool.DruidDataSource",
//                fields : {
//                    url : "jdbc:mysql://chenyingxi.mysql.rds.aliyuncs.com:3306/cyx?useUnicode=true&characterEncoding=UTF-8",
//                    username : "cyx",
//                    password :"cyx123"
//                }
//            }
//        }
//    }
//};

var ioc = {
    nutDao: {
        //    type : "org.nutz.dao.impl.ext.LazyNutDao",
        type: "org.nutz.dao.impl.NutDao",
        args: [
            {refer: "dataSource"}
        ]
    },
    json: {
        type: "org.nutz.mvc.view.UTF8JsonView",
        args: [
            {
                type: 'org.nutz.json.JsonFormat',
                fields: {
                    autoUnicode: true
                }
            }
        ]
    },
    dataSource: {
        type: "com.alibaba.druid.pool.DruidDataSource",
        events: {
            depose: "close"
        },
        fields: {
            //     driverClassName : "org.h2.Driver",
            url: "jdbc:mysql://chenyingxi.mysql.rds.aliyuncs.com:3306/cyx?useUnicode=true&characterEncoding=UTF-8",
            username: "cyx",
            password: "cyx123"
        }
    }
};
